﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Serious
{
    public static class IEnumerableExt
    {
        public static T RandomElement<T>(this IEnumerable<T> enumerable, Random rng)
        {
            return enumerable.ElementAt(rng.Next(enumerable.Count()));
        }
    }
}
